<div class="panel-default">
  <table lay-filter="demo" lay-size='lg'>
    <thead>
      <tr>

        <th lay-data="{field:'phone'}"><%= GuestBook.human_attribute_name(:phone) %></th>

        <th lay-data="{field:'name'}"><%= GuestBook.human_attribute_name(:name) %></th>

        <th lay-data="{field:'content'}"><%= GuestBook.human_attribute_name(:content) %></th>

        <th lay-data="{field:'operation',width:200}"></th>
      </tr>
    </thead>

    <tbody>
      <% @guest_books.each do |guest_book| %>
        <tr>

          <td><%= guest_book.phone %></td>

          <td><%= guest_book.name %></td>

          <td><%= guest_book.content %></td>

          <td>
            <%= link_to [:admin, guest_book], method: :delete, data: { confirm: '确定删除吗? 注意此操作无法撤销！' }, class: "label label-danger" do -%><i class="iconfont icon-shanchu"></i>删除<% end %>
          </td>
        </tr>
      <% end %>
    </tbody>
  </table>
  <!-- 分页 -->
  <%= render 'admin/public_views/page', record: @guest_books, record_count: @guest_books.count %>
</div>



